diff --git a/sympy/integrals/integrals.py b/sympy/integrals/integrals.py
index 48bbc8042d..55a3d6cda0 100644
--- a/sympy/integrals/integrals.py
+++ b/sympy/integrals/integrals.py
@@ -903,7 +903,12 @@ def _eval_integral(self, f, x, meijerg=None, risch=None, manual=None,
         parts = []
         args = Add.make_args(f)
         for g in args:
-            coeff, g = g.as_independent(x)
+            coeff, g = g.as_independent(x, as_Add=False)
+            if not coeff.is_zero:
+                integral_g = self._eval_integral(g, x, meijerg, risch, manual, heurisch, conds)
+                if integral_g is not None and not isinstance(integral_g, Integral):
+                    parts.append(coeff * integral_g)
+                    continue
 
             # g(x) = const
             if g is S.One and not meijerg:
